Skip to content

chore(toolbox-langchain): rename auth_tokens to auth_token_getters #182

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 29, 2025

Conversation

anubhav756
Copy link
Contributor

@anubhav756 anubhav756 commented Apr 20, 2025

  • In the load_tool and load_toolset methods (and their async counterparts aload_tool, aload_toolset) within the toolbox-langchain package, rename the auth_tokens parameter to auth_token_getters.
  • Deprecate the old auth_tokens parameter.

This is to align with the toolbox-core APIs and also because the suffix of _getter(s) make these APIs more descriptive and accurate.

Because of the _getter suggesting it should be a function rather than a value, it actively encourages best practices regarding token security and lifecycle management (like refresh logic), which is crucial for production systems.

@anubhav756 anubhav756 self-assigned this Apr 20, 2025
@anubhav756 anubhav756 force-pushed the anubhav-auth-token-getter branch from 598a6f9 to 508c460 Compare April 20, 2025 21:43
@anubhav756 anubhav756 marked this pull request as ready for review April 21, 2025 08:10
@anubhav756 anubhav756 requested a review from a team as a code owner April 21, 2025 08:10
@anubhav756 anubhav756 changed the title chore: Update auth_token(s) as auth_token_getter(s) and add_auth_token(s) as add_auth_token_getter(s) chore(toolbox-langchain): Rename auth_tokens to auth_token_getters Apr 21, 2025
@anubhav756 anubhav756 force-pushed the anubhav-auth-token-getter branch from 508c460 to a37e5cc Compare April 21, 2025 12:21
@anubhav756 anubhav756 force-pushed the anubhav-auth-token-getter branch 3 times, most recently from 508c460 to 2388dc9 Compare April 21, 2025 16:11
@anubhav756 anubhav756 changed the title chore(toolbox-langchain): Rename auth_tokens to auth_token_getters chore(toolbox-langchain)!: Rename auth_tokens to auth_token_getters Apr 21, 2025
@anubhav756 anubhav756 changed the title chore(toolbox-langchain)!: Rename auth_tokens to auth_token_getters chore(toolbox-langchain): Rename auth_tokens to auth_token_getters Apr 21, 2025
@kurtisvg kurtisvg changed the title chore(toolbox-langchain): Rename auth_tokens to auth_token_getters chore(toolbox-langchain): rename auth_tokens to auth_token_getters Apr 21, 2025
@anubhav756 anubhav756 force-pushed the anubhav-auth-token-getter branch from 2388dc9 to c1f1e27 Compare April 29, 2025 10:27
…n(s) as add_auth_token_getter(s)

This is to align with the toolbox-core APIs and also because the suffix of _getter(s) make these APIs more descriptive and accurate.

It actively encourages best practices regarding token security and lifecycle management (like refresh logic), which is crucial for production systems.
@anubhav756 anubhav756 force-pushed the anubhav-auth-token-getter branch from c1f1e27 to d0d61f5 Compare April 29, 2025 10:28
@anubhav756 anubhav756 enabled auto-merge (squash) April 29, 2025 10:28
@anubhav756 anubhav756 merged commit 48fd28c into main Apr 29, 2025
19 checks passed
@anubhav756 anubhav756 deleted the anubhav-auth-token-getter branch April 29, 2025 10:30
@release-please release-please bot mentioned this pull request Apr 29, 2025
anubhav756 added a commit that referenced this pull request May 10, 2025
…lity

This PR addresses a breaking change introduced by the removal of `add_auth_token(s)` methods in #182. To ensure backward compatibility and facilitate a smoother upgrade path, these methods are now reintroduced but explicitly marked as **deprecated**. Users are encouraged to migrate to the new `add_auth_token_getter(s)` methods instead.

> [!NOTE]
> The `strict` flag in the deprecated methods are not used anymore since the functionality of the `strict` flag has been changed (see #205 for more details).
anubhav756 added a commit that referenced this pull request May 10, 2025
…lity

This PR addresses a breaking change introduced by the removal of `add_auth_token(s)` methods in #182. To ensure backward compatibility and facilitate a smoother upgrade path, these methods are now reintroduced but explicitly marked as **deprecated**. Users are encouraged to migrate to the new `add_auth_token_getter(s)` methods instead.

> [!NOTE]
> The `strict` flag in the deprecated methods are not used anymore since the functionality of the `strict` flag has been changed (see #205 for more details).
anubhav756 added a commit that referenced this pull request May 12, 2025
…lity

This PR addresses a breaking change introduced by the removal of `add_auth_token(s)` methods in #182. To ensure backward compatibility and facilitate a smoother upgrade path, these methods are now reintroduced but explicitly marked as **deprecated**. Users are encouraged to migrate to the new `add_auth_token_getter(s)` methods instead.

> [!NOTE]
> The `strict` flag in the deprecated methods are not used anymore since the functionality of the `strict` flag has been changed (see #205 for more details).
anubhav756 added a commit that referenced this pull request May 14, 2025
…lity

This PR addresses a breaking change introduced by the removal of `add_auth_token(s)` methods in #182. To ensure backward compatibility and facilitate a smoother upgrade path, these methods are now reintroduced but explicitly marked as **deprecated**. Users are encouraged to migrate to the new `add_auth_token_getter(s)` methods instead.

> [!NOTE]
> The `strict` flag in the deprecated methods are not used anymore since the functionality of the `strict` flag has been changed (see #205 for more details).
anubhav756 added a commit that referenced this pull request May 14, 2025
…lity

This PR addresses a breaking change introduced by the removal of `add_auth_token(s)` methods in #182. To ensure backward compatibility and facilitate a smoother upgrade path, these methods are now reintroduced but explicitly marked as **deprecated**. Users are encouraged to migrate to the new `add_auth_token_getter(s)` methods instead.

> [!NOTE]
> The `strict` flag in the deprecated methods are not used anymore since the functionality of the `strict` flag has been changed (see #205 for more details).
anubhav756 added a commit that referenced this pull request May 14, 2025
…lity

This PR addresses a breaking change introduced by the removal of `add_auth_token(s)` methods in #182. To ensure backward compatibility and facilitate a smoother upgrade path, these methods are now reintroduced but explicitly marked as **deprecated**. Users are encouraged to migrate to the new `add_auth_token_getter(s)` methods instead.

> [!NOTE]
> The `strict` flag in the deprecated methods are not used anymore since the functionality of the `strict` flag has been changed (see #205 for more details).
anubhav756 added a commit that referenced this pull request May 14, 2025
…lity

This PR addresses a breaking change introduced by the removal of `add_auth_token(s)` methods in #182. To ensure backward compatibility and facilitate a smoother upgrade path, these methods are now reintroduced but explicitly marked as **deprecated**. Users are encouraged to migrate to the new `add_auth_token_getter(s)` methods instead.

> [!NOTE]
> The `strict` flag in the deprecated methods are not used anymore since the functionality of the `strict` flag has been changed (see #205 for more details).
anubhav756 added a commit that referenced this pull request May 14, 2025
…lity

This PR addresses a breaking change introduced by the removal of `add_auth_token(s)` methods in #182. To ensure backward compatibility and facilitate a smoother upgrade path, these methods are now reintroduced but explicitly marked as **deprecated**. Users are encouraged to migrate to the new `add_auth_token_getter(s)` methods instead.

> [!NOTE]
> The `strict` flag in the deprecated methods are not used anymore since the functionality of the `strict` flag has been changed (see #205 for more details).
anubhav756 added a commit that referenced this pull request May 14, 2025
…lity

This PR addresses a breaking change introduced by the removal of `add_auth_token(s)` methods in #182. To ensure backward compatibility and facilitate a smoother upgrade path, these methods are now reintroduced but explicitly marked as **deprecated**. Users are encouraged to migrate to the new `add_auth_token_getter(s)` methods instead.

> [!NOTE]
> The `strict` flag in the deprecated methods are not used anymore since the functionality of the `strict` flag has been changed (see #205 for more details).
anubhav756 added a commit that referenced this pull request May 15, 2025
…lity

This PR addresses a breaking change introduced by the removal of `add_auth_token(s)` methods in #182. To ensure backward compatibility and facilitate a smoother upgrade path, these methods are now reintroduced but explicitly marked as **deprecated**. Users are encouraged to migrate to the new `add_auth_token_getter(s)` methods instead.

> [!NOTE]
> The `strict` flag in the deprecated methods are not used anymore since the functionality of the `strict` flag has been changed (see #205 for more details).
anubhav756 added a commit that referenced this pull request May 15, 2025
…lity

This PR addresses a breaking change introduced by the removal of `add_auth_token(s)` methods in #182. To ensure backward compatibility and facilitate a smoother upgrade path, these methods are now reintroduced but explicitly marked as **deprecated**. Users are encouraged to migrate to the new `add_auth_token_getter(s)` methods instead.

> [!NOTE]
> The `strict` flag in the deprecated methods are not used anymore since the functionality of the `strict` flag has been changed (see #205 for more details).
anubhav756 added a commit that referenced this pull request May 16, 2025
…lity

This PR addresses a breaking change introduced by the removal of `add_auth_token(s)` methods in #182. To ensure backward compatibility and facilitate a smoother upgrade path, these methods are now reintroduced but explicitly marked as **deprecated**. Users are encouraged to migrate to the new `add_auth_token_getter(s)` methods instead.

> [!NOTE]
> The `strict` flag in the deprecated methods are not used anymore since the functionality of the `strict` flag has been changed (see #205 for more details).
anubhav756 added a commit that referenced this pull request May 16, 2025
…lity

This PR addresses a breaking change introduced by the removal of `add_auth_token(s)` methods in #182. To ensure backward compatibility and facilitate a smoother upgrade path, these methods are now reintroduced but explicitly marked as **deprecated**. Users are encouraged to migrate to the new `add_auth_token_getter(s)` methods instead.

> [!NOTE]
> The `strict` flag in the deprecated methods are not used anymore since the functionality of the `strict` flag has been changed (see #205 for more details).
anubhav756 added a commit that referenced this pull request May 16, 2025
…lity

This PR addresses a breaking change introduced by the removal of `add_auth_token(s)` methods in #182. To ensure backward compatibility and facilitate a smoother upgrade path, these methods are now reintroduced but explicitly marked as **deprecated**. Users are encouraged to migrate to the new `add_auth_token_getter(s)` methods instead.

> [!NOTE]
> The `strict` flag in the deprecated methods are not used anymore since the functionality of the `strict` flag has been changed (see #205 for more details).
anubhav756 added a commit that referenced this pull request May 16, 2025
…lity

This PR addresses a breaking change introduced by the removal of `add_auth_token(s)` methods in #182. To ensure backward compatibility and facilitate a smoother upgrade path, these methods are now reintroduced but explicitly marked as **deprecated**. Users are encouraged to migrate to the new `add_auth_token_getter(s)` methods instead.

> [!NOTE]
> The `strict` flag in the deprecated methods are not used anymore since the functionality of the `strict` flag has been changed (see #205 for more details).
anubhav756 added a commit that referenced this pull request May 16, 2025
…lity

This PR addresses a breaking change introduced by the removal of `add_auth_token(s)` methods in #182. To ensure backward compatibility and facilitate a smoother upgrade path, these methods are now reintroduced but explicitly marked as **deprecated**. Users are encouraged to migrate to the new `add_auth_token_getter(s)` methods instead.

> [!NOTE]
> The `strict` flag in the deprecated methods are not used anymore since the functionality of the `strict` flag has been changed (see #205 for more details).
anubhav756 added a commit that referenced this pull request May 16, 2025
…lity

This PR addresses a breaking change introduced by the removal of `add_auth_token(s)` methods in #182. To ensure backward compatibility and facilitate a smoother upgrade path, these methods are now reintroduced but explicitly marked as **deprecated**. Users are encouraged to migrate to the new `add_auth_token_getter(s)` methods instead.

> [!NOTE]
> The `strict` flag in the deprecated methods are not used anymore since the functionality of the `strict` flag has been changed (see #205 for more details).
anubhav756 added a commit that referenced this pull request May 16, 2025
…lity

This PR addresses a breaking change introduced by the removal of `add_auth_token(s)` methods in #182. To ensure backward compatibility and facilitate a smoother upgrade path, these methods are now reintroduced but explicitly marked as **deprecated**. Users are encouraged to migrate to the new `add_auth_token_getter(s)` methods instead.

> [!NOTE]
> The `strict` flag in the deprecated methods are not used anymore since the functionality of the `strict` flag has been changed (see #205 for more details).
anubhav756 added a commit that referenced this pull request May 16, 2025
…lity (#236)

* fix(toolbox-langchain)!: Base toolbox-langchain over toolbox-core

* fix: add toolbox-core as package dependency

* fix: Base sync client

* fix: Fix running background asyncio in current loop issue

* fix: Base toolbox sync & async tools to toolbox core counterparts

* fix: Fix getting pydantic model from ToolboxSyncTool

* fix: Fix issue causing async core tools for creating sync tools

* fix: Fix reading name from correct param

* fix: Fix issue of unknown parameter due to pydantic initialization

* fix: Fix nit error + add comment

* fix: Fix sync tool name assertion

* chore: Temporarily remove unittests

* chore: Remove unused strict flag + fix default values + fix docstring

* fix: Update package to be from git repo

* fix: Fix toolbox-core package local path

* fix: Fix local package path

* fix: Update git path

* fix: Fix tests

* fix: Fix using correct object for fetching loop

* fix: Return invoke result

* fix: Integration test errors

* chore: Delint

* fix: Fix integration test

* fix: Fix integration tests

* chore: Add unit tests previously deleted

* chore: Delint

* fix: Fix using correct protected member variables

* chore: Delint

* chore: Fix types

* fix: Ensure bg loop/thread not null

* fix: Check bg loop/thread value

* fix: Revert warnings to prefer auth_tokens over auth_headers

* chore: Update unittests

* docs: Improve docstrings

* chore: Add TODO note

* chore: Improve TODO note

* fix: Fix integration test

* chore: Delint

* chore: Rename internal member variable names to be more concise

* chore: Delint

* chore: Add toolbox actual package version in toml and local path in requirements.txt

* fix: Fix editable toolbox-core package path in requirements.txt

* fix: Fix lowest supported version until released

* fix: Fix issue causing relative path in requirements.txt to cause issues

* docs: Fix issue README

* fix: Use correct core client interfaces in langchain client

* fix: Use correct core tool interfaces in langchain tool

* fix: Use correct interface from core tool

* fix: Use correct interfaces of toolbox-core

* chore: Update async client unit tests

* chore: Fix client unit tests

* chore: Delint

* chore: Fix tools unit tests

* chore: Restore add_auth_token(s) as deprecated for backward compatibility

This PR addresses a breaking change introduced by the removal of `add_auth_token(s)` methods in #182. To ensure backward compatibility and facilitate a smoother upgrade path, these methods are now reintroduced but explicitly marked as **deprecated**. Users are encouraged to migrate to the new `add_auth_token_getter(s)` methods instead.

> [!NOTE]
> The `strict` flag in the deprecated methods are not used anymore since the functionality of the `strict` flag has been changed (see #205 for more details).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants